package com.sale.system.dubbo;

import com.sale.system.api.RemoteCodeService;
import com.sale.system.service.ISysDocumentService;
import com.sale.system.service.ISysMidSplitService;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;


/**
 * 编码生成
 */
@RequiredArgsConstructor
@DubboService
@Service
public class RemoteCodeServiceImpl implements RemoteCodeService {

    private final ISysDocumentService sysDocumentService;

    private final ISysMidSplitService sysMidSplitService;

    /**
     * 编码生成(根据当前页面权限码)
     * @param docConfig
     * @return
     */
    @Override
    public String authorityCoding(String docConfig) throws Exception {
        return sysDocumentService.selectAuthorityCoding(docConfig);
    }

    /**
     * 编码生成(根据编码)
     * @param
     * @return
     */
    @Override
    public String splitList(String str1) throws Exception {
        return sysMidSplitService.selectSplitStr(str1);
    }


}
